package com.yyh1;

public class Person {
    //属性
    //姓名属性
    private String name;
    //年龄属性
    private int age;
    //行为
    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
    //显示方法
    public void display(){
        System.out.println("这个人的姓名是"+name+"年龄是"+age);
    }

}
